package cn.jdy.plugins.entity.ytwh;

import cn.jdy.common.bo.BaseEntry;
import cn.jdy.platform.entity.ConfValue;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

import java.io.Serializable;

/**
 * 产品实体类
 */
@Entity
public class YtwhProductx extends BaseEntry implements Serializable {

	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	// 根据数据库自动适配 mysql默认自增
	private Long id; // 主键
	private String title; // 产品名称
	private String author; // 作者
	@Column(columnDefinition = "longtext")
	private String context; // 产品详细描述
	private String summary; // 产品简介
	private String keyword; // 关键词
	private String originAddress; // 产地 或 来源

	@Column(updatable = false)
	// 第一次增加之后不可修改
	private String userid; // 发布人
	private String username; // 发布人

	private Integer readTimes; // 阅读次数
	private Integer goodtimes; // 点蛅次数
	private String imgUrl; // 封面图片地址
	private String status; // 状态 0已发布、1已下架、2审核中、3审核不通过
	private String model; // 型号
	@Column(nullable = false)
	private Long columnId;

	@ManyToOne
	@JoinColumn(name = "columnId", insertable = false, updatable = false)
	private ConfValue cv;

	// 汉水商城新增字段
	@Column(nullable = true)
	private double price; // 价格
	@Column(nullable = true)
	private double shopprice; // 店铺价格
	@Column(nullable = true)
	private double reduceprice; // 减价
	private String refund; // 支持随时退款，1支持过期退款，0支持随时退款
	private String overdue; // 预留字段
	private Integer sku; // 库存数量
	private Integer sold; // 已售数量

	private Integer mallId; // 商家ID
	private String noticeTime; // 通知时间
	private String notice; // 通知
	@Column(columnDefinition = "datetime")
	private String produceBegin; // 有效期
	@Column(columnDefinition = "datetime")
	private String produceEnd; // 有效期
	private String mallname; // 商家名称
	@Column(columnDefinition = "longtext")
	private String productximg; // 图片简介
	private String by1; // 活动图片
  private String county;// 所在地区  县级
  private String city;// 所在地区 市
  private String province;// 所在地区 省

	public String getProvince() {
    return province;
  }

  public void setProvince(String province) {
    this.province = province;
  }

  public String getCounty() {
    return county;
  }

  public void setCounty(String county) {
    this.county = county;
  }

  public String getCity() {
    return city;
  }

  public void setCity(String city) {
    this.city = city;
  }

  public Integer getSold() {
		return sold;
	}

	public void setSold(Integer sold) {
		this.sold = sold;
	}

	
	public String getProductximg() {
		return productximg;
	}

	public void setProductximg(String productximg) {
		this.productximg = productximg;
	}

	public String getBy1() {
		return by1;
	}

	public void setBy1(String by1) {
		this.by1 = by1;
	}

	public String getAuthor() {
		return author;
	}

	public void setAuthor(String author) {
		this.author = author;
	}

	public String getMallname() {
		return mallname;
	}

	public void setMallname(String mallname) {
		this.mallname = mallname;
	}

	public double getShopprice() {
		return shopprice;
	}

	public void setShopprice(double shopprice) {
		this.shopprice = shopprice;
	}

	public String getOriginAddress() {
		return originAddress;
	}

	public void setOriginAddress(String originAddress) {
		this.originAddress = originAddress;
	}

	public Integer getReadTimes() {
		return readTimes;
	}

	public void setReadTimes(Integer readTimes) {
		this.readTimes = readTimes;
	}

	public Integer getGoodtimes() {
		return goodtimes;
	}

	public void setGoodtimes(Integer goodtimes) {
		this.goodtimes = goodtimes;
	}

	public String getModel() {
		return model;
	}

	public void setModel(String model) {
		this.model = model;
	}

	public double getPrice() {
		return price;
	}

	public void setPrice(double price) {
		this.price = price;
	}

	public double getReduceprice() {
		return reduceprice;
	}

	public void setReduceprice(double reduceprice) {
		this.reduceprice = reduceprice;
	}

	public String getRefund() {
		return refund;
	}

	public void setRefund(String refund) {
		this.refund = refund;
	}

	public String getOverdue() {
		return overdue;
	}

	public void setOverdue(String overdue) {
		this.overdue = overdue;
	}

	public Integer getMallId() {
		return mallId;
	}

	public void setMallId(Integer mallId) {
		this.mallId = mallId;
	}

	public String getNoticeTime() {
		return noticeTime;
	}

	public void setNoticeTime(String noticeTime) {
		this.noticeTime = noticeTime;
	}

	public String getNotice() {
		return notice;
	}

	public void setNotice(String notice) {
		this.notice = notice;
	}

	public Integer getSku() {
		return sku;
	}

	public void setSku(Integer sku) {
		this.sku = sku;
	}

	public String getProduceBegin() {
		return produceBegin;
	}

	public void setProduceBegin(String produceBegin) {
		this.produceBegin = produceBegin;
	}

	public String getProduceEnd() {
		return produceEnd;
	}

	public void setProduceEnd(String produceEnd) {
		this.produceEnd = produceEnd;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public ConfValue getCv() {
		return cv;
	}

	public void setCv(ConfValue cv) {
		this.cv = cv;
	}

	public String getImgUrl() {
		return imgUrl;
	}

	public void setImgUrl(String imgUrl) {
		this.imgUrl = imgUrl;
	}

	public String getUsername() {
		return username;
	}

	public void setUsername(String username) {
		this.username = username;
	}

	public String getUserid() {
		return userid;
	}

	public void setUserid(String userid) {
		this.userid = userid;
	}

	public String getKeyword() {
		return keyword;
	}

	public void setKeyword(String keyword) {
		this.keyword = keyword;
	}

	public String getSummary() {
		return summary;
	}

	public void setSummary(String summary) {
		this.summary = summary;
	}

	public String getContext() {
		return context;
	}

	public void setContext(String context) {
		this.context = context;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getColumnId() {
		return columnId;
	}

	public void setColumnId(Long columnId) {
		this.columnId = columnId;
	}

}
